import employees from '@/assets/constant/employees'
import moment from 'moment'
moment.locale('zh-cn')

export default function(Vue) {
  const obj = {
    filterHireType: (id) => {
      const result = employees.hireType.find((item) => item.id === id)
      return result ? result.value : '-'
    },
    filterDate: (item) => {
      moment(item).format('YYYY-MM-DD')
    }
  }
  Object.keys(obj).forEach((item) => {
    Vue.filter(item, obj[item])
  })
}
